AXES PXI

  • Chassis: PXIe-1071 (this could be replaced with the bigger and better ventilated PXIe-1086, there is space in the cabinet for it)

  • CPU: PXIe-8880

  • Ethernet cards (x1): PXIe-8234

Compiled code

The code generated by the MainAxesPXI.lvproj must be copied to the /c/ni-rt/startup directory.

The content of /c/ni-rt/startup directory should look like this:

admin@AxesPXI:/c/ni-rt/startup# ls -lh
total 11704
lrwxrwxrwx    1 admin    administ      22 Apr 25  2020 README_File_Paths.txt -> /README_File_Paths.txt
drwxrwxrwx    2 admin    administ    4.0K Nov  3 21:08 data/
drwxrwxrwx    3 admin    administ    4.0K Nov  3 21:08 project/
-rwxr-xr-x    1 admin    administ      74 Nov 18 17:28 startup.aliases*
-rwxr-xr-x    1 admin    administ   11.4M Nov 18 17:28 startup.rtexe*
admin@AxesPXI:/c/ni-rt/startup#

Configuration files

This section explains the location and which are the configuration files needed for this PXI. All the same structure, the main configuration files are stored in the /c/Configuration directory, here some are then inside other directories to make things more clear. But each of them contains the specific configuration files for the code running in it.

AXES PXI /c/Configuration contents:

admin@AxesPXI:/c/Configuration# ls -lR
.:
total 16
-rwxr-xr-x    1 lvuser   ni            5117 Nov 24 21:41 MainAxisConfig.ini*
drwxr-xr-x    2 lvuser   ni            4096 Oct 21 01:56 axisManagementComm/

./axisManagementComm:
total 4
-rwxr-xr-x    1 lvuser   ni             568 Nov 18 17:37 ServerConfig.xml*
admin@AxesPXI:/c/Configuration#

Now each of the files is explained:

  • MainAxisConfig.ini: This file is necessary at boot, is used to define the general configuration. If a section is empty the default values are used.

  • ./axisManagementComm/ServerConfig.xml: This file is necessary at boot, here the configuration for the TCP server used to communicate with the TMA PXI server is specified. If not found at boot the code won’t startup.

The default configuration for all the necessary files listed here can be found in this repo inside the ESIFiles directory.

MainAxisConfig

As this is the one that has the general information a specific section is created. This file can have multiple sections, as a *.ini file, it uses [sectionName] to divide the file.

  • log section: here the configuration for the logging is defined.

    • Path: the absolute path for the log files, it needs to have a main file name, a date is going to be added to it. Default value: /home/lvuser/log/MainLogFile.log

    • Active: a boolean “FALSE”/“TRUE” to disable/enable the logging. Default value: “TRUE”.

    [Log]
    Path = "/home/lvuser/log/AuxTMA.log"
    Active = "TRUE"
    
  • StartupDelays section: here the waits (in ms) before starting each task are defined.

    • GeneralWait: general wait for pausing everything from starting. Default value: 5000

    • AxesInterfaceWait: wait before starting the axis interface task (the main axes control loops). Default value: 5000

    • EncoderWait: wait before starting the encoder task. Default value: 5000

  • Timed Loops Processors section: here the processors for each control loop are defined.

    • Monitoring Loop 1: generic loop for monitoring. Default value: 1

    • Monitoring Loop 2: generic loop for monitoring. Default value: 2

    • Trajectory Loop Azimuth: loop for the trajectory generation for Azimuth. Default value: 4

    • Trajectory Loop Elevation: loop for the trajectory generation for Elevation. Default value: 4

    • Control Loop Azimuth: loop for the control of Azimuth. Default value: 5

    • Control Loop Elevation: loop for the control of Elevation. Default value: 6

    • Encoder UPD Loop: loop for receiving the encoder UDP data. Default value: 7

  • Azimuth and Elevation sections: here the configuration for each axis is defined.

    • ma to iu: conversion gain from miliampers to internal units.

    • Torque To current Polynomial: conversion equation for converting from torque to current.

    • Counter Value to allow error pass trough: counter for an ethercat error. Default value: 2147483500

    • dt (scan Engine Periods): the scan periods dt. Default value: 1

    • TrajectoryPriority: priority for the control loop. Default value: 65500

    • maxConstraints.XXX: initial values for the trajectory generator. These are overwritten by the TMA PXI when powering on the axis.

    • TrackingConfiguration.XXX: initial values for the trajectory generator. These are overwritten by the TMA PXI when powering on the axis.

    • Buffer length (200): tracking commands buffer size, this means the amount of commands that can be stored in the trajectory generator.

    • Drives: the list of ethercat variables for the drives.

    • HallSensor: the ethercat variable for the hall sensor.

  • IPs section: here the IPs for connecting to the different device targets are defined.

    • tmaPxiIp: specify the IP of the TMA PXI here, if not defined the default value will be used. Default: 192.168.209.10.

    • auxPxiIp: specify the IP of the AUX PXI here, if not defined the default value will be used. Default: 192.168.209.11.

    • axesPxiIp: specify the IP of the AXES PXI here, if not defined the default value will be used. Default: 192.168.213.11.

    • tmaIsIp: specify the IP of the TMA IS (safety PLC CPU module) here, if not defined the default value will be used. Default: 192.168.180.10.

    • mcc: specify the IP of the MCC here, if not defined the default value will be used. Default: 192.168.209.200.

    [IPs]
    tmaPxiIp = 139.229.171.3
    auxPxiIp = 139.229.171.4
    axesPxiIp = 139.229.171.26
    tmaIsIp = 192.168.180.10
    mcc = 139.229.171.6
    

Libraries

The shared libraries (SO) used by the code must be stored in /usr/local/lib.

TMA PXI /usr/local/lib contents:

admin@AxesPXI:/usr/local/lib# ls -l
total 160
-rwxr-xr-x    1 admin    administ     11128 Nov  3 21:08 libGetClocks.so*
-rwxr-xr-x    1 admin    administ     62096 Nov 21 19:18 libtrajectory.so*
-rwxr-xr-x    1 admin    administ      7824 Nov  3 21:08 lvimptsl.so*
admin@AxesPXI:/usr/local/lib#